﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Nexterday.Linq.Autocompiler.L2S.Tests
{
    public class NullCompiledQueryCache : ICompiledQueryCache
    {
        public List<string> Keys { get; set; }

        public NullCompiledQueryCache()
        {
            Keys = new List<string>();
        }
        #region ICompiledQueryCache Members

        public Delegate GetOrAdd<TResult>(string key, Func<string,Delegate> valueFactory)
        {
            Keys.Add(key);
            return valueFactory.Invoke("");
        }

        #endregion
    }
}
